package com.weitu.risk.service.impl;

import com.weitu.risk.mapper.StatisticsMapper;
import com.weitu.risk.service.StatisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * Created by fanyuting on 2017/5/15 0015.
 */
@Service
public class StatisticsServiceImpl implements StatisticsService {
    /**
     * 按风险等级统计
     *
     * @param map
     * @return
     */
    @Autowired
    private StatisticsMapper statisticsMapper;

    public List<Map<String, Object>> statisticsByRiskGradeList(Map<String, Object> map) {
        return this.statisticsMapper.statisticsByRiskGradeList(map);
    }

    public int statisticsByRiskGradeCount(Map<String, Object> map) {
        return this.statisticsMapper.statisticsByRiskGradeCount(map);
    }

    /**
     * 按风险识别对象类型统计
     *
     * @param map
     * @return
     */
    public List<Map<String, Object>> statisticsByRecogniseTypeList(Map<String, Object> map) {
        return this.statisticsMapper.statisticsByRecogniseTypeList(map);
    }

    public int statisticsByRecogniseTypeCount(Map<String, Object> map) {
        return this.statisticsMapper.statisticsByRecogniseTypeCount(map);
    }

    /**
     * 按风险类别统计
     *
     * @param map
     * @return
     */
    public List<Map<String, Object>> statisticsByRiskTypeList(Map<String, Object> map) {
        return this.statisticsMapper.statisticsByRiskTypeList(map);
    }

    public int statisticsByRiskTypeCount(Map<String, Object> map) {
        return this.statisticsMapper.statisticsByRiskTypeCount(map);
    }

    /**
     * 根据重大风险评审状态统计
     *
     * @param map
     * @return
     */
    public List<Map<String, Object>> statisticsBySeriousState(Map<String, Object> map) {
        return this.statisticsMapper.statisticsBySeriousState(map);
    }
}
